package com.ke.reggie.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @BelongsProject: reggie_take_out
 * @BelongsPackage: com.ke.reggie.config
 * @Author: ke_huifeng
 * @CreateTime: 2022-10-03  20:38
 * @Description: TODO
 * @Version: 1.0
 */
@Configuration
public class MybatisPlusConfig {
    /*
     * @description:分页插件
     * @author: ke_huifeng
     * @date: 2022/10/3 20:42
     * @param: []
     * @return: com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor
     **/
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatisPlusInterceptor;
    }
}
